package dataTypesPackage;
import java.util.Date;
import java.util.List;

import dataConnectionPackage.Facade;

public class Sefer {

	private int SeferID;
	private String name;
	private Gemi gemi;
	private Guzergah guzergah;
	private List<Integer> fiyatlar;
	//private GregorianCalendar startDate;
	//private GregorianCalendar endDate;
	private Date  startDate;
	private Date  endDate;
	@SuppressWarnings("unused")
	private int sysAdminID;
	@SuppressWarnings("unused")
	private boolean isVisible;

	public Sefer(int sysAdminID,int SeferID , String name, Gemi gemi, Guzergah guzergah,
			List<Integer> fiyatlar) {
		this.sysAdminID = sysAdminID;
		this.name = name;
	//	this.gemi = gemi;
	//	this.guzergah = guzergah;
		this.fiyatlar = fiyatlar;
		this.SeferID=SeferID;
	}

    public Sefer(int sysAdminID, String name, Gemi gemi, Guzergah guzergah) {
        this.sysAdminID = sysAdminID;
        this.name = name;
        this.gemi = gemi;
        this.guzergah = guzergah;
        this.startDate = new Date();
        this.endDate = new Date();
}
	
	
	public Sefer(int SeferID, String name, int gemiID, int guzergahID, String fiyatList, Date startDate, Date endDate, int sysAdminID) {
		//this.sysAdminID = sysAdminID;
		this.name = name;
		this.gemi = (Gemi) Facade.getInstance().get(gemiID, Gemi.class);
		this.guzergah = (Guzergah) Facade.getInstance().get(guzergahID, Guzergah.class);
		this.SeferID=SeferID;
		this.endDate=endDate;
		this.startDate=startDate;
		this.sysAdminID=sysAdminID;
		
	}
	

	public Sefer() {
		// this is for empty sefers.
		this.sysAdminID=0;
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Gemi getGemi() {
		return gemi;
	}

	public void setGemi(Gemi gemi) {
		this.gemi = gemi;
	}

	public Guzergah getGuzergah() {
		return guzergah;
	}

	public void setGuzergah(Guzergah guzergah) {
		this.guzergah = guzergah;
	}

	public List<Integer> getFiyatlar() {
		return fiyatlar;
	}

	public void setFiyatlar(List<Integer> fiyatlar) {
		this.fiyatlar = fiyatlar;
	}

	public void setSeferID(int seferID) {
		SeferID = seferID;
	}

	public int getSeferID() {
		return SeferID;
	}

	@Override
	public String toString() {
		return "Sefer " + name;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getEndDate() {
		return endDate;
	}
	
}
